//
//  ZGLPageCollectionViewCell.m
//  Faker
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "ZGLPageCollectionViewCell.h"

@interface ZGLPageCollectionViewCell ()

@property (nonatomic, strong) UILabel *pageLabel;

@end

@implementation ZGLPageCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        self.pageLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.pageLabel];
    }
    return self;
}

- (void)setCurrentPage:(NSInteger)currentPage {
    _currentPage = currentPage;
    self.pageLabel.text = [NSString stringWithFormat:@"%ld / %ld", currentPage, _allPage];
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    [super applyLayoutAttributes:layoutAttributes];
    self.backgroundColor = foreColor;
    [self.pageLabel setFrame:CGRectMake(ScaleX * 300, ScaleY * 13.5, ScaleX * 65, ScaleY * 20)];
    self.pageLabel.textColor = [UIColor lightGrayColor];
    self.pageLabel.textAlignment = 1;
    self.pageLabel.font = [UIFont systemFontOfSize:10];
    
}


@end
